import axios from 'axios'

export default {
  ajaxPost(api,data,fn){
    axios.post(api,data).then((res)=>{
      fn(res);
    });
  },
  ajaxGet(api,data,fn){
    axios.get(api,{params:data}).then((res)=>{
      fn(res);
    });
  }
}